//
//  DestinationHomePageObject.m
//  HappyTrip
//
//  Created by yuxuesong on 15-3-23.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "DestinationHomePageObject.h"

@implementation DestinationHomePageObject

- (void)dealloc
{
    [_index release];
    [_title release];
    [_data release];
    [super dealloc];
}

- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

+ (instancetype)destinaWithDic:(NSMutableDictionary *)dic
{
    DestinationHomePageObject *homePageObj = [[DestinationHomePageObject alloc] initWithDic:dic];
    return [homePageObj autorelease];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
     if ([key isEqualToString:@"title"]) {
        self.title = value;
     } else if ([key isEqualToString:@"index"]) {
         self.index = value;
     }
//     else  {
//        [super setValue:value forKey:key];
//    }
}
- (id)valueForUndefinedKey:(NSString *)key
{
    return nil;
}

@end
